package ownserver;

import java.io.Serializable;

import com.sun.sgs.app.ManagedObject;
import com.sun.sgs.app.ManagedReference;

public class Collision implements Serializable, ManagedObject{
	private static final long serialVersionUID = 1L;

	public Collision(ManagedReference<ServerShip> refA, ManagedReference<ServerShip> refB) {
		this.refA = refA;
		this.refB = refB;
	}
	
	ManagedReference<ServerShip> refA, refB;
	
	public boolean equals(Object o) {
		if (o instanceof Collision == false) {
			return false;
		}
		Collision c = (Collision) o;
		if (refA == c.refA && refB == c.refB) {
			return true;
		}
		if (refA == c.refB && refB == c.refA) {
			return true;
		}
		
		return false;
	}
}
